package com.ruoyi.common.model.farmer.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * @author huixh
 */
public class FarmerProductSkus extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 关联 `farmer_products` 表 */
    @Excel(name = "关联 `farmer_products` 表")
    private Long productId;

    /** 存储该 SKU 的规格值组合，格式为逗号分隔的 ID（例如：1,2,3） */
    @Excel(name = "存储该 SKU 的规格值组合，格式为逗号分隔的 ID", readConverterExp = "例=如：1,2,3")
    private String specValueIds;

    /** 该规格的价格 */
    @Excel(name = "该规格的价格")
    private BigDecimal price;

    /** 该规格的库存 */
    @Excel(name = "该规格的库存")
    private Long stock;

    /** 该规格的主图 */
    @Excel(name = "该规格的主图")
    private String mainImage;

    public FarmerProductSkus() {
    }

    public FarmerProductSkus(Long id, Long productId, String specValueIds, BigDecimal price, Long stock, String mainImage) {
        this.id = id;
        this.productId = productId;
        this.specValueIds = specValueIds;
        this.price = price;
        this.stock = stock;
        this.mainImage = mainImage;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }
    public void setSpecValueIds(String specValueIds)
    {
        this.specValueIds = specValueIds;
    }

    public String getSpecValueIds()
    {
        return specValueIds;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setStock(Long stock)
    {
        this.stock = stock;
    }

    public Long getStock()
    {
        return stock;
    }
    public void setMainImage(String mainImage)
    {
        this.mainImage = mainImage;
    }

    public String getMainImage()
    {
        return mainImage;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("productId", getProductId())
                .append("specValueIds", getSpecValueIds())
                .append("price", getPrice())
                .append("stock", getStock())
                .append("mainImage", getMainImage())
                .toString();
    }
}
